from PyQt5 import QtWidgets, QtGui

from views.shared import SmallLabel


class ReviewWidget(QtWidgets.QWidget):
    def __init__(self, review):
        super(ReviewWidget, self).__init__()

        self.layout = QtWidgets.QVBoxLayout()
        self.layout.addWidget(SmallLabel(review.getAuthor()))
        self.layout.addWidget(SmallLabel("%d/5" % review.getRating()))
        self.layout.addWidget(SmallLabel(review.getBody()))

        self.setLayout(self.layout)
